package com.chixing.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

//  实体类：相机
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Camera {
    private Integer id;             //  相机id
    private String name;            //  相机名称
    private Double price;           //   相机价格
    private Double originalPrice;   //  相机原价
    private String status;          //  相机状态
    private String location;        //  卖家位置
    private String images;          //  相机图片
    private Double rating;          //  评分
    private String seller;          //  卖家
    private String timePosted;      //   发布时间
    private String brand;           //   品牌
    private String type;            //  型号
    private Integer stock;          //  库存
    public String toJson(){
        return "{\"id\":\""+id+"\",\"name\":\""+name+"\",\"price\":\""+price+"\",\"originalPrice\":\""+originalPrice+"\",\"status\":\""+status+"\",\"location\":\""+location+"\",\"images\":\""+images+"\",\"rating\":\""+rating+"\",\"seller\":\""+seller+"\",\"timePosted\":\""+timePosted+"\",\"brand\":\""+brand+"\",\"type\":\""+type+"\",\"stock\":\""+stock
                +"\"}";
    }
}
